﻿/*
 * DistanceUnits
 * 
 * initial implementation : 20.11.2008
 *
 * Copyright (c) Adam Sida, asida@centrum.cz.
 * All rights reserved.
 * 
 * for license see Petra.Gis.License.txt
 */
using System;
using System.Collections;

namespace Petra.Gis.ReferenceSystemServices
{
  /// <summary>
  /// predefined distance units
  /// </summary>
  public partial class DistanceUnit : MeasureUnit
  {


    public static readonly DistanceUnit Milimeter = new DistanceUnit(0.001, new Metadata("milimetre", "EPSG", 9001, "mm", String.Empty, "Known as International milimetre. SI standard unit."));
    public static readonly DistanceUnit Centimeter = new DistanceUnit(0.01, new Metadata("centimetre", "EPSG", 9001, "cm", String.Empty, "Known as International centimetre. SI standard unit."));
    public static readonly DistanceUnit Decimeter = new DistanceUnit(0.1, new Metadata("decimetre", "EPSG", 9001, "dm", String.Empty, "Known as International decimetre. SI standard unit."));
    public static readonly DistanceUnit Meter = new DistanceUnit(1, new Metadata("metre", "EPSG", 9001, "m", "m", "Known as International metre. SI standard unit."));
    public static readonly DistanceUnit Kilometer = new DistanceUnit(1000, new Metadata("kilometre", "EPSG", 9001, "km", String.Empty, "Known as International kilometre. SI standard unit."));

    /// <summary>
    /// Returns the inch linear unit (1in = 0.025400000000000002m).
    /// </summary>
    public static readonly DistanceUnit Inch = new DistanceUnit(0.025400000000000002, new Metadata("inch", "unknown", -1, "in", String.Empty, String.Empty));

		/// <summary>
    /// Returns the foot linear unit (1ft = 0.3048m).
		/// </summary>
		public static readonly DistanceUnit Foot = new DistanceUnit(0.3048, new Metadata( "foot", "EPSG", 9002, "ft", String.Empty, String.Empty));

    /// <summary>
    /// Returns the US Survey foot linear unit (1ftUS = 0.304800609601219m).
    /// </summary>
    public static readonly DistanceUnit USSurveyFoot = new DistanceUnit(0.304800609601219, new Metadata("US survey foot", "EPSG", 9003, "American foot", "ftUS", "Used in USA."));
    
    /// <summary>
    /// Returns the Nautical Mile linear unit (1NM = 1852m).
    /// </summary>
    public static readonly DistanceUnit NauticalMile = new DistanceUnit(1852, new Metadata("nautical mile", "EPSG", 9030, "NM", String.Empty, String.Empty));

    /// <summary>
    /// Returns Clarke's foot.
    /// </summary>
    /// <remarks>
    /// Assumes Clarke's 1865 ratio of 1 British foot = 0.3047972654 French legal metres applies to the international metre. 
    /// Used in older Australian, southern African &amp; British West Indian mapping.
    /// </remarks>
    public static readonly DistanceUnit ClarkesFoot = new DistanceUnit(0.3047972654, new Metadata("Clarke's foot", "EPSG", 9005, "Clarke's foot", String.Empty, "Assumes Clarke's 1865 ratio of 1 British foot = 0.3047972654 French legal metres applies to the international metre. Used in older Australian, southern African & British West Indian mapping."));
    
    /// <summary>
    /// special map unit for world projections such as platee caree, Mercator or Equrectangular
    /// where lat/lon is simply interpreted as x,y map space.
    /// This unit is not angular but has meaning of angle in degrees.
    /// On equator has this unit following size: 1 unit = 116600 m.
    /// </summary>
    public static readonly DistanceUnit ProjectedDegree = new DistanceUnit(116600, new Metadata("projdegree", "asida", 1, "pd", "pd", "Special map unit for world projections such as Mercator or Equrectangular where lat/lon is converted to x,y map space. This unit is not angular but has meaning of angle in degrees, On equator has this unit following size: 1 unit = 116600 m."));

  }
}
